
<?php
session_start();
$_SESSION["username"];
//注册session变量，赋值为一个用户的ID
$_SESSION["uid"]=1;
header("Content-type:text/html;charset=utf-8");
$link = mysqli_connect('localhost','root','123456','zb');
if (!$link) {
die("连接失败:".mysqli_connect_error());
}


//$sql= "INSERT INTO text_table(user_id,object1,object2,object3,object4,object5,object6,object7,object8,object9,object10,object11,object12,object13,object14,object15,object16,object17,text0,text1,text2,text3,text4,text5,text6,text7,text8,text9,text10,text11,text12,text13,text14,text15,text16,text17,comment0,comment1,comment2,comment3,comment4,comment5,comment6,comment7,comment8,comment9,comment10,comment11,comment12,comment13,comment14,comment15,comment16,comment17,status0,status1,status2,status3,status4,status5,status6,status7,status8,status9,status10,status11,status12,status13,status14,status15,status16,status17,comment)values('$user_id','$object0','$object1','$object2','$object3','$object4','$object5','$object6','$object7','$object8','$object9','$object10','$object11','$object12','$object13','$object14','$object15','$object16','$object17','$text0','$text1','$text2','$text3','$text4','$text5','$text6','$text7','$text8','$text9','$text10','$text11','$text12','$text13','$text14','$text15','$text16','$text17','$comment0','$comment1','$comment2','$comment3','$comment4','$comment5','$comment6','$comment7','$comment8','$comment9','$comment10','$comment11','$comment12','$comment13','$comment14','$comment15','$comment16','$comment17','$status0','$status1','$status2','$status3','$status4','$status5','$status6','$status7','$status8','$status9','$status10','$status11','$status12','$status13','$status14','$status15','$status16','$status17','$comment')";
$sql= "INSERT INTO text_table(  )values(  )";
//插入数据库
if(!(mysqli_query($link,$sql))){
    echo "<script>alert('数据插入失败');</script>";
}else{
    echo "<script>alert('注册成功！)</script>";
}

?>
